﻿// 
//    Copyright 2010 The JaernCloud Project
// 
//    Licensed under the Apache License, Version 2.0 (the "License");
//    you may not use this file except in compliance with the License.
//    You may obtain a copy of the License at
// 
//        http://www.apache.org/licenses/LICENSE-2.0
// 
//    Unless required by applicable law or agreed to in writing, software
//    distributed under the License is distributed on an "AS IS" BASIS,
//    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//    See the License for the specific language governing permissions and
//    limitations under the License.
// 
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using JaernCloud.Web.Controllers;
using JaernCloud.Language.Compiler.Types;
using JaernCloud.Language.Runtime.View;
using System.Diagnostics;
using System.IO;
using System.Web.Script.Serialization;

namespace JaernCloud.Web.MVC2.Controllers {
    [HandleError]
    public class HomeController : JaernCloudController {
        
        public ActionResult Index() {
            
            // TODO Move this and use a IViewEngine instead!
            ViewNodeObject view = GetView();
            ViewData["JaernCloud.View"] = view;
            ViewData["JaernCloud.Render"] = Render(view);

            return View();

        }

        public ActionResult About() {
            return View();
        }

    }
}
